<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>登录信息</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<link rel="stylesheet" href="css/amazeui.min.css" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/css/amazeui.min.css" type="text/css" />
		<link rel="stylesheet" href="css/style.css" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/css/style.css" type="text/css" />
	</head>
	<body>
		<header data-am-widget="header" class="am-header am-header-default jz">
		      <div class="am-header-left am-header-nav">
		         <a href="javascript:history.back()" class="">
					<i class="am-icon-chevron-left"></i>
				</a>
		      </div>
		      <h1 class="am-header-title">
		          <a class="">登录</a>
		      </h1>
        </header>
        <div class="logo"><img src="images/logo.png" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/images/logo.png"/></div>
    	<div>
    		<p style="text-align: center;" id="msg"></p>
    	</div>
	</body>
	<script type="text/javascript" src="js/jquery.min.js" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/js/jquery.min.js" ></script>
	<script type="text/javascript" src="js/amazeui.min.js" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/js/amazeui.min.js"></script>
	<script type="text/javascript" src="js/hui.js"></script>
	<script>
	  	var urlVal=window.location.href;
		var search = decodeURI(urlVal.substr(urlVal.indexOf("=")+1,urlVal.length));
	    if(!search){
	    	$("#msg").html("微信授权登录失败!请联系管理员");
	    }else{
		    hui.getJSON(
			    rootpath+'/businessMan/findBusinessMan/'+search,
			    function(msg){
		    		if(msg.type==0){
		    			$("#msg").html('对不起！您不是商会成员，无权限访问，请联系管理员授权，联系电话<a href="tel:0532-85696999" style="color:#009cff">0532-85696999</b>');
		    		}else{
		    			localStorage.removeItem("id");
						localStorage.setItem("id",msg.id);
						location.href="index.html";
		    		}
			    },
			    function(e){
			        hui.iconToast('读取消息失败', 'warn');
			        console.log(e);
			    }
			);
	    }
	</script>
</html>

